import {observable, action} from 'mobx-miniprogram'
import {getStorage} from '../utils/storage'
export const userstore=observable({

//创建可观察状态token
token:getStorage('token') || '',
userInfo:getStorage('userInfo')||{},
//对token进行修改 
setToken:action(function(token){
  this.token=token
}),
setUserInfo:action(function(userInfo){
  this.userInfo=userInfo
})
})